package com.fengmi.interceptor;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * 作者：铁蛋
 * 时间：2021/10/23 14:38
 * 描述：永无Bug
 */
@Configuration
public class SpringMVCConfiguration implements WebMvcConfigurer {
    @Autowired
    private UserInfoInterceptor userInfoInterceptor;


    @Override
    public void addInterceptors(InterceptorRegistry registry) {

        registry.addInterceptor(userInfoInterceptor)
                .addPathPatterns("/**");

    }


}
